﻿#include "Mystring.h"

int main()
{
	/*Ysz::string s1 = "hellworld";
	Ysz::string s2 = "xxxy";
	cout << s1.c_str() << endl;
	cout << s2.c_str() << endl;
	s1.swap(s2);
	cout << s1.c_str() << endl;
	cout << s2.c_str() << endl;

	cout << s1.size() << endl;
	cout << s1.capacity() << endl;

	bool l = s1.empty();
	Ysz::string s3;
	cout << l<< endl;
	l = s3.empty();
	cout << l << endl;*/
	Ysz::string s1 = "hello world";
	

	/*for (auto x : s1)
	{
		cout << x << endl;
	}*/
	//s1.erase(2, 3);
	/*s1.resize(15, '#');
	cout << s1.c_str() << endl;*/
	
	Ysz::string s2 = "hello world";
	bool n = s1 != s2;
	cout <<  s2 << endl; 
	//char x;
	

	cout << s2.substr(6,1) << endl;
	//Ysz::getline(cin, s2);
	//cout << s2 << endl;

	//size_t n = s1.find("world", 7);
	//cout << n << endl;
	return 0;
}
